Arithmetic for secure multi-party computation with modular integers

ABSTRACT

A secure multi-party computation implements real number arithmetic using modular integer representation on the backend. As part of the implementation, a secret shared value jointly stored by multiple parties in a first modular representation is cast into a second modular representation having a larger most significant bit. The parties use a secret shared masking value in the first representation, the range of which is divided into two halves, to mask and reveal a sum of the secret shared value and the secret shared masking value. The parties use a secret shared bit that identifies the half of the range that contains the masking value, along with the sum to collaboratively construct a set of secret shares representing the secret shared value in the second modular format. In contrast with previous work, the disclosed solution eliminates a non-zero probability of error without sacrificing efficiency or security.

RELATED APPLICATIONS

The subject matter of this application is related to Patent Cooperation Treaty Application PCT/US2020/019551, filed 2020 Feb. 24, U.S. Provisional Application No. 62/809,543, filed on 2019 Feb. 22, and Patent Cooperation Treaty Application No. PCT/US2018/048963, filed on 2018 Aug. 30 and published on 2019 Mar. 7 as World Intellectual Property Organization International Publication Number WO2019046651A2, all of which applications are hereby incorporated by reference in their entireties.

BACKGROUND OF THE INVENTION

Privacy-preserving multi-party computation (MPC) techniques enable multiple parties to collaboratively evaluate a function to produce a shared or revealed output while keeping the inputs private. Such computations are used, for example, in medicine and finance, when the input data comes from distinct private data sources that cannot disclose their data, but a public result based on the confidential data is needed.

A MPC is generally split both temporally and geographically across multiple participants. The participants, each of which represents a separate computing system, typically include k parties and one trusted dealer. As used herein, the terms party and player are used interchangeably and refer to individual party computer systems participating in a multi-party computation.

After compilation of code to implement the computation, the trusted dealer first executes an offline phase of the MPC. In the offline phase, the trusted dealer produces masks (masking data, also referred to as triplets), and distributes shares of these masks to the parties such that each party knows only its share of the mask and none of them know the plaintext mask value represented by a sum of the shares. The determination of the masks typically depends on the data expected to be operated upon from statistical analysis perspective so that the masks are appropriately configured in relation to the data.

The k parties then collaboratively execute an online phase of the MPC, with synchronization steps where parties can exchange or broadcast messages according to a defined MPC protocol. The online phase can be run in a firewalled environment to which the trusted dealer has no access.

A MPC can be the distributed equivalent of a plaintext pseudocode, which we can describe as a single static assignment (SSA) graph of MPC-friendly elementary operations. The nodes of the SSA graph are plaintext variables, and each party gets a local view (or secret share) of the variables. We denote this local view as an MPC container. The MPC-friendly elementary operations are referred to as builtins that take MPC containers and optionally some static parameters, as input and produce MPC containers as output.

FIG. 1 illustrates a schematic of MPC containers for k parties of a multi-party computation. Globally, a MPC container holds all the information about one variable in the SSA, namely, a plaintext value x that can be either public (known by all parties, but not the trusted dealer) or a secret-shared

x

(each party knows its share only), one mask

N

(known by the dealer, and secret shared among all parties), and the optional masked value a=x+λ (known by all parties, but typically not the dealer). Notation note: the double square bracket notation

is used herein to denote a secret shared value.

Locally, each party has a trace of the MPC container, which can be a structure with fields as follows:

-   -   the public value x (if the container is publicly revealed)     -   one share x_(j) of the public value     -   one share λ_(j) of the container's mask     -   the masked value a (if the container is masked and revealed).

Analyzing the union of the k containers, the following holds: the plaintext value of the container is by definition the sum of all shares Σx_(j), if the container is public, all parties know the plaintext value, and each party has this value x populated. In this case, none of the other fields need be used in the MPC protocol. The mask of the container is λ=Σλ₁. The value of the mask is known only by the trusted dealer (during the offline phase). None of the parties knows or learns the actual mask during the online phase. The masked value a is equal to λ+x. The special mask-and-reveal operation instructs each party to broadcast its x_(j)+λ_(j), which allows them to jointly reconstruct and store the same field a=x+λ. All other technical or local variable that appears in the builtins are called ephemeral variables.

Two prior works have proposed the use of fixed-point integer representations, as opposed to floating-point representations, for representing real numbers in the context of MPC. The first of the prior works will be referred to hereinafter as “SecureML”, by P. Mohassel and Y. Zhang, and titled “SecureML: A system for scalable privacy-preserving machine learning”, in 2017 IEEE Symposium on Security and Privacy, S P 2017, San Jose, Calif., USA, May 22-26, 2017, pages 19-38, 2017. The second of the prior works will be referred to hereinafter as “ABY³”, by P. Mohassel and P. Rindal, and titled “ABY³: A mixed protocol framework for machine learning”, in Proceedings of the 2018 ACM SIGSAC Conference on Computer and Communications Security, CCS 2018, Toronto, ON, Canada, Oct. 15-19, 2018, pages 35-52, 2018.

The modReal Representation. In these works, real number arithmetic is implemented through the evaluation of additions, subtractions and rounded divisions on fixed-size integer types (such as int64, that is, integers modulo 2⁶⁴). For instance, to multiply two 30-bit integers x and y and retain the 30 most significant bits of the result (analogously to floating point multiplication), one can first compute xy (by fitting the product into a 64-bit integer without any overflows) and then right-shift the result by 30 bits. The two works adapt these operations to the MPC setting where a plaintext xϵ

is secret-shared among k parties (k=2 in SecureML and k≥3 in ABY³) as (x₁, . . . , x_(k))ϵ(

/q

)^(k) (for some integer q), such that x=centermod_(q)(x₁+ . . . +x_(k)). The signed mathematical lift centermod_(q)(x) is defined to be the unique integer {tilde over (x)}ϵ[−q/2, q/2) such that {tilde over (x)}≡x(mod q). We denote this particular representation of real numbers on arithmetic shares as the modReal representation.

SecureML, Section 4.1, subsection titled “Arithmetic Operations on Shared Decimal Numbers” suggests as follows. Consider a fixed-point product of two binary decimal numbers x and y stored in a common integer representation such that

bits of each number are defined to represent the fractional part of the number (binary digits after the decimal point). In this case, x′=

and y′=

will be integers that can be natively represented using an integer back-end. The product z=x′y′, with the multiplication taking place in

/

for some integer

, however, will have up to

bits in the fractional part of the representation. It may not be practical, however, to maintain the additional binary digits after the decimal, particularly in the context of a MPC. SecureML suggests to decrease the number of bits representing the fractional part in the result by ignoring or truncating the last

_(D) bits. For example, the product can be represented as: z=

+z₀ where 0≤z₀<

, and consider the result to include only z₁=└z/

┘.

SecureML then extends above truncation technique to a secret shared value

z

. In effect, two parties holding respective secret shares of

z

can truncate their individual shares. It is then shown in Theorem 1 that with high probability, the two truncated shares can reconstruct the truncation └z/

┘ of z. This solution relies on the following premise: if x₁ and x₂ are two secret shares of a very small x, then with very high probability, the two shares x₁ and x₂ are in the two opposite half circles mod

. The solution, which only works with two parties, relies on a local procedure to truncate the shares, but has a non-zero probability that the resulting secret shared value will be incorrect.

ABY³ addresses the limitations of the SecureML two party truncation technique in § 5.1.1, and § 5.2.2 presents additional techniques for truncation that extend to three or more parties in a MPC setting. Again, however, these additional techniques have a non-negligible probability of failure in practice.

In the two prior works, multiplication is performed using Beaver triplets modulo q. Rounding can be performed locally on each share (at a price of a small error on the plaintext value bounded by √k/2), and addition can be done locally at each share. Two variants for division are proposed: the first one, in SecureML, is a two party solution without communication between the two parties and the second one, in ABY3 is a Beaver triplet-based solution for k parties. In both cases, the result of the division is correct most of the time; yet, a huge undetectable overflow occurs with some small, but non-zero probability. The overflow probability for a plaintext range of M integer elements and shares modulo q is M/q. In the above-mentioned example of multiplying two 30-bit integers, the overflow probability is 261/264=1/8 and drops down to 241/264 if we reduce the precision to 20 bits. When it occurs, the overflow is large (the overflow amplitude has been mitigated since SecureML, yet, it still changes the most significant bits of the result in the new ABY3 revision). Thus, any aggregate function that includes these wrong values gets affected. The overflow probability is per-coefficient, so if we do a computation on a vector or a matrix of N coefficients (as is the case for most ML use-cases such as logistic regression, linear regression, neural nets), the presence of at least one destructive overflow gets multiplied by N and becomes non-negligible.

The two possible counter-measures proposed by the two prior works to deal with millions of coefficients are either to reduce the precision (provide at most 10 bits of precision on a 64-bit backend), or to increase the backend-size to e.g. 128-bits (4 to 16 times slower). Note that 10 bits of fixed point precision can be enough in numerically stable use-cases, where we know the exact distribution of the plaintext (e.g. feature-scaled input, output of a sigmoid etc.). However, we can also encounter major underflow situations if the fixed point exponent is estimated 4 or 5 bits higher than the actual values, because of an uncertainty on the secret plaintext distribution.

SUMMARY OF THE INVENTION

In the context of a secure multi-party computation, a secret shared value jointly stored by multiple parties in a first modular representation is cast into a second modular representation having a larger most significant bit. The cast includes a trusted dealer secret sharing with the parties a masking value the range of which is divided into two halves. The parties use the masking value to mask and reveal a sum of the secret shared value and the masking value. The trusted dealer also secret shares with the parties a bit encoding the half of the range that contains the masking value. The parties use the secret shared bit along with the sum to collaboratively reconstruct a set of secret shares representing the secret shared value in the second modular format. In contrast with previous work, the disclosed solution eliminates a non-zero probability of error without sacrificing efficiency or security. This method is described in additional detail in section 3.1 of the detailed description below.

A method can be performed by a secure multi-party computing system (SMPCS) configured for performing multi-party computations on secret shared values, where the SMPCS includes a trusted dealer computing system and a plurality of party computing systems in secure networked communication. The method is for casting a secret shared value from a first modular representation to a second modular representation, wherein the first modular representation has a range defined by a most significant bit position and a least significant bit position of the first modular representation, and wherein the second modular representation has a range defined by a most significant bit position and a least significant bit position of the second modular representation, and wherein the most significant bit position of the second modular representation is greater than the most significant bit position of the first modular representation.

In accordance with one embodiment, each of the party computing systems stores a respective secret share of the secret shared value in the first modular representation. The trusted dealer computing system stores a masking value and communicates to each of the party computing systems a respective secret share of the masking value in the first modular representation so that the masking value is secret shared between the party computing systems in the first modular representation. The trusted dealer computing system: determines a subrange in which the masking value resides, wherein the subrange is selected from a plurality of predetermined non-overlapping subranges representing the range of the first modular representation; encodes the determined subrange into a numerical subrange identifier, and communicates to each of the party computing systems a respective secret share of the numerical subrange identifier so that the numerical subrange identifier is secret shared between the party computing systems. The trusted dealer computing system transforms the masking value, in a first transformation, into a transformed masking value by at least performing a first mathematical lift on the masking value. The trusted dealer computing system communicates to each of the party computing systems a respective secret share of the transformed masking value in the second modular representation so that the transformed masking value is secret shared between the party computing systems in the second modular representation. The party computing systems collaboratively compute and reveal a sum of the secret shared value and the masking value as a masked value without revealing the secret shares of the secret shared value or the secret shares of the masking value.

The SMPCS transforms the masked value, in a second transformation, into a first transformed masked value by at least performing a second mathematical lift on the masked value. The SMPCS transforms the masked value, in a third transformation, into a second transformed masked value by at least performing a third mathematical lift on the masked value, wherein the first mathematical lift, the second mathematical lift and the third mathematical lift are each different from one another. The party computing systems collaboratively compute the secret shared value in the second modular representation such that each of the party computing systems computes a respective secret share of the secret shared value in the second modular representation based on: the first transformed masked value, the second transformed masked value, for each party computing system, the respective secret share of the numerical subrange identifier, and for each party computing system, the respective secret share of the transformed masking value.

The method can be performed wherein the first mathematical lift and the second mathematical lift produce values relative to each other that are offset by one quarter of the range of the first modular representation, and wherein the second mathematical lift and the third mathematical lift produce values relative to each other that are offset by one half of the range of the first modular representation.

The method can be performed wherein the first mathematical lift, the second mathematical lift, and the third mathematical lift are each selected from the group consisting of: a quartermod lift parameterized by 2^(M) ^(msb) , where (M_(msb)−1) is the most significant bit position of the first modular representation, a centermod lift parameterized by 2^(M) ^(msb) , and a posmod lift parameterized by 2^(M) ^(msb) .

The method can be performed wherein the first mathematical lift is a quartermod lift on the masking value parameterized by 2^(M) ^(msb) , wherein the second mathematical lift is a centermod lift on the masked value parameterized by 2^(M) ^(msb) , wherein the third mathematical lift is a posmod lift on the masked value parameterized by 2^(M) ^(msb) , and where (M_(msb)−1) is the most significant bit position of the first modular representation.

The method can be performed wherein a quartermod lift on x parameterized by 2^(M) is defined as a unique real

$\overset{˜}{x} \in \left\lbrack {{- \frac{2^{M}}{4}},\frac{3 \cdot 2^{M}}{4}} \right)$ such that {tilde over (x)}−xϵ2^(M)

, wherein a centermod lift on x parameterized by 2^(M) is defined as a unique real

$\overset{˜}{x} \in \left\lbrack {{- \frac{2^{M}}{2}},\frac{2^{M}}{2}} \right)$ such that {tilde over (x)}−xϵ2^(M)

, and wherein a posmod lift on x parameterized by 2^(M) is defined as a unique real {tilde over (x)}ϵ[0, 2^(M)) such that {tilde over (x)}−xϵ2^(M)

.

The method can be performed wherein the first transformation further includes: rounding a result of the first mathematical lift to a nearest multiple of 2^(p′) ^(lsb) , where P′_(lsb) is the least significant bit position of the second modular representation, and taking a modulo 2^(M′) ^(msb) of the rounding, where (M′_(msh)−1) is the most significant bit position of the second modular representation; wherein the second transformation further includes: rounding a result of the second mathematical lift to a nearest multiple of 2^(p′) ^(lsb) , and taking a modulo 2^(M′) ^(msb) of the rounding; and wherein the third transformation further includes: rounding a result of the third mathematical lift to a nearest multiple of 2^(p′) ^(lsb) , and taking a modulo 2^(M′) ^(msb) of the rounding.

The method can be performed wherein the first transformation, the second transformation and the third transformation each includes projecting a result of the associated mathematical lift onto

/2^(M′) ^(msb)

, where (M′_(msb)−1) is the most significant bit position of the second modular representation.

The method can be performed wherein the “plurality of predetermined non-overlapping subranges” consists of two equally sized subranges, and wherein the numerical subrange identifier is selected from a group consisting of the numbers 0 and 1.

The method can be performed wherein the secret shared numerical subrange identifier is used by the party computing systems collaboratively to select between the first transformed masked value and the second transformed masked value for use in calculating the secret shared value in the second modular representation.

The method can be performed wherein the first modular representation and the second modular representation are fixed point integer representations of real numbers.

A method can be performed by a SMPCS configured for performing multi-party computations on secret shared values, where the SMPCS includes a plurality of party computing systems in secure networked communication. The method is for casting a secret shared value from a first modular representation to a second modular representation, wherein the first modular representation has a range defined by a most significant bit position and a least significant bit position of the first modular representation, and wherein the second modular representation has a range defined by a most significant bit position and a least significant bit position of the second modular representation, and wherein the most significant bit position of the second modular representation is greater than the most significant bit position of the first modular representation.

In accordance with one embodiment, each of the party computing systems stores a respective secret share of the secret shared value in the first modular representation. The SMPCS communicates to each of the party computing systems a respective secret share of a masking value so that the masking value is secret shared between the party computing systems. The SMPCS communicates to each of the party computing systems a respective secret share of an indication of a subrange in which the masking value resides, wherein the subrange is selected from a plurality of predetermined non-overlapping subranges representing the range of the first modular representation, so that the subrange indication is secret shared between the party computing systems. The SMPCS transforms the masking value, in a first transformation, into a transformed masking value by at least performing a first mathematical lift on the masking value. The SMPCS communicates to each of the party computing systems a respective secret share of the transformed masking value in the second modular representation so that the transformed masking value is secret shared between the party computing systems in the second modular representation. The party computing systems collaboratively compute and reveal a sum of the secret shared value and the masking value as a masked value without revealing the secret shares of the secret shared value or the secret shares of the masking value. The SMPCS transforms the masked value, in a second transformation, into a first transformed masked value by at least performing a second mathematical lift on the masked value. The SMPCS transforms the masked value, in a third transformation, into a second transformed masked value by at least performing a third mathematical lift on the masked value, wherein the first mathematical lift, the second mathematical lift and the third mathematical lift are each different from one another. The party computing systems collaboratively compute the secret shared value in the second modular representation such that each of the party computing systems computes a respective secret share of the secret shared value in the second modular representation based on: the first transformed masked value, the second transformed masked value, for each party computing system, the respective secret share of the subrange indication, and for each party computing system, the respective secret share of the transformed masking value.

The method can be performed wherein the first transformation, the second transformation and the third transformation each includes projecting a result of the associated mathematical lift onto

/2^(M′) ^(msb)

, where (M′_(msb)−1) is the most significant bit position of the second modular representation.

The method can be performed wherein the “plurality of predetermined non-overlapping subranges” consists of two equally sized subranges, and wherein the numerical subrange identifier is selected from a group consisting of the numbers 0 and 1.

The method can be performed wherein the secret shared numerical subrange identifier is used by the party computing systems collaboratively to select between the first transformed masked value and the second transformed masked value for use in calculating the secret shared value in the second modular representation.

The method can be performed wherein the first modular representation and the second modular representation are fixed point integer representations of real numbers.

A method for performing a multiplication of a first secret shared value stored in a respective initial modular representation and a second secret shared value stored in a respective initial modular representation, can include: casting, in accordance with any one of the foregoing methods for casting, at least one of the first secret shared value and the second secret shared value into a common modular representation such that both the first secret shared value and the second secret shared value are stored in the common modular representation; and performing a beaver multiplication on the first secret shared value and the second secret shared value in the common modular representation.

A method for combining a plurality of secret shared values, each being stored in a respective initial modular representation, and a corresponding plurality of static coefficients can include: casting, in accordance with any one of the foregoing methods for casting, at least one of the plurality of secret shared values into a common modular representation such that all of the plurality of secret shared values are stored in the common modular representation; and performing a linear combination on the plurality of secret shared values stored in the common modular representation and the corresponding plurality of static coefficients.

A method of evaluating a continuous function on a secret shared value can include: selecting a Fourier series, based on the secret shared value, from a plurality of determined Fourier series, wherein each of the plurality of determined Fourier series is configured to approximate the continuous function on an associated subinterval of a domain of the continuous function; based on the selection, casting, in accordance with any one of the foregoing methods for casting, the secret shared value from a first modular representation to a second modular representation; and approximating a value of the continuous function on the secret shared value in the second modular representation using the selected Fourier series.

A system can include a plurality of computer systems configured to perform any one of the foregoing methods.

A non-transitory computer-readable medium can be encoded with computer code that, when executed by a plurality of computer systems, causes the plurality of computer systems to perform any one of the foregoing methods.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 illustrates a schematic of MPC containers.

FIG. 2 illustrates the relationship between bits in a fixed point representation.

FIG. 3 illustrates four casting operations for casting representations between classes.

FIG. 4 illustrates an example application of each of the four casting operations on an example input value.

FIG. 5 illustrates a pseudocode implementation of an offline phase of the Lift operation.

FIG. 6 illustrates a pseudocode implementation of an online phase of the Lift operation.

FIG. 7 illustrates a pseudocode implementation of an offline phase of the Share Refresh operation.

FIG. 8 illustrates a pseudocode implementation of an online phase of the Share Refresh operation.

FIG. 9 illustrates a pseudocode implementation of a Beaver multiplication operation on two secret shared values in modular representation.

FIG. 10 illustrates a schematic of the Beaver multiplication operation.

FIG. 11 illustrates a pseudocode implementation of a Beaver multiplication operation on one secret shared value in modular representation and one public value.

FIG. 12 illustrates a schematic of the Beaver multiplication operation.

FIG. 13 illustrates an example input upon which a cleaning step can be performed.

FIG. 14 illustrates a pseudocode implementation of a Linear combination operation with ModReal representation.

FIG. 15 illustrates a schematic of the Linear combination operation.

FIG. 16A shows the communication channels for a trusted dealer model.

FIG. 16B communication channels for the honest but curious model.

FIG. 17 illustrates a schematic of communication channels between parties during an online phase.

FIG. 18 illustrates a general computer architecture that can be appropriately configured to implement components disclosed herein.

DETAILED DESCRIPTION

In the following description, references are made to various embodiments in accordance with which the disclosed subject matter can be practiced. Some embodiments may be described using the expressions one/an/another embodiment or the like, multiple instances of which do not necessarily refer to the same embodiment. Particular features, structures or characteristics associated with such instances can be combined in any suitable manner in various embodiments unless otherwise noted. By way of example, this disclosure may set out a set or list of a number of options or possibilities for an embodiment, and in such case, this disclosure specifically contemplates all clearly feasible combinations and/or permutations of items in the set or list.

1 Overview

In this disclosure, we present novel techniques for performing real number arithmetic with high numerical precision using modular integer representations in a multi-party computation (MPC) setting. In particular, we disclose a method for casting a secret shared value stored in a first modular representation to a second modular representation. In contrast with the previous work, the disclosed solution advantageously eliminates errors without sacrificing efficiency and security, which is important for machine learning techniques such as linear and logistic regressions.

We adopt a full-threshold security model for MPC and split computations into offline and online phases. The offline phase (independent of the input data) can be performed either by a trusted dealer or by an honest-but-curious dealer. Stronger models and verifiability of this phase can be achieved via standard techniques such as oblivious transfer and cut-and-choose. The online phase computes additive shares of the result.

In our work, we keep the same definition of the shares as in the prior work, but we modify the triplet (masking value) definition by adding a small term that eliminates completely the overflow (as long as M/q≤1/2). The method keeps a single round of communication during the online phase and adds only a few binary operations that preserve the overall running time. The new method is always correct, the security is unconditional and it works for any number of parties.

To briefly summarize, the overflow in ABY³ comes from the fact that during the division operation, for example, one has to reconstruct the small plaintext xϵZ from a random mask r′ mod q (chosen during the offline phase) and a masked value a=x′−r′ mod q. The latter is revealed during the online phase before applying a division operation that is incompatible with the classes mod q. In order to do that, both r′ and a are implicitly lifted to integers in [−q/2, q/2). More precisely, in ABY³ § 5.1.1, 5.1.2, these two implicit centered lifts occur during two operations: 1) in the definition of the triplet r=r′/2^(d) where r′ϵ

/q

is random and 2) in the reveal x′−r′ϵ

/q

and locally compute (x′−r′)/2^(d) operation. These two lifts are not always compatible with the further assumption that a−r′ is equal to x′ over the reals (the equality may differ by +q or −q with small probability). In our new setting, we preserve the full range of r′, which ensures unconditional security. Yet, we split the group

/q

in two halves, and during the offline phase, we secret share an additional bit encoding the half group that contains r′ and add this secret shared bit to the same triplet. Each half-group corresponds to a different lift for a−r′ so the parties can compute both lifts and then use the shared bit to obliviously select the right one during the online phase.

2 Representations of Plaintext Values and Secret Shares

2.1 Floating and Fixed-Point Representations

A plaintext real value x can be represented in floating-point form as x=m·2^(e) ϵ

where

-   -   The mantissa m is normalized so that ½≤|m|<1, and     -   The exponent eϵZ (data dependent).         This representation is clearly data-dependent in the sense that         both m and e depend on the plaintext value x. In particular, the         value of the exponent e is precisely ┌log₂|x|┐. Since the         floating-point representation needs information about the size         of x to determine the exponent e, it is data dependent and not         MPC friendly, as this value e is not known by the compiler prior         to a multi-party computation.

A plaintext real value x can also be represented in fixed-point (integer) form as x=m·2^(e)ϵ

where

The mantissa m is normalized so that ½≤|m|<1, and

The exponent eϵZ (public value).

From the compiler's perspective prior to commencing a multi-party computation, the exponent can be regarded or treated as public whereas the mantissa can be treated as private. Since the compiler does not know the secret number x before the computation, it is impossible for the compiler to determine the exact e that guarantees the above normalization for m. This representation is not suitable either since it can easily overflow or underflow as shown in the following two examples:

Overflow. Suppose that we are multiplying the following two numbers (in binary): x=10.1₍₂₎ and y=10₍₂₎. Both of these have exponent 2. Yet, if the precomputed public exponent of the result is still two, the computation will overflow since: x×y=101₍₂₎. Thus, we need an exponent of at least 3 to avoid the overflow.

Underflow. Suppose that we are in a scenario where the number of bits in the mantissa is bounded (say 4 bits) and we would like to compute x²=1.1₍₂₎×1.1₍₂₎=10.01₍₂₎. If our pre-computed exponent were 3 instead of 2, with this limitation, we will lose precision, namely, the result will be 010.0₍₂₎ instead of 10.01₍₂₎.

We thus adopt an intermediate method where we book-keep a sufficiently good bound on the exponent for each value in the program. This bound can be estimated statically, by certain statistical analysis, via a special purpose compiler. This method keeps track of public bounds, as precisely as possible, on the secret value, without revealing the secret value itself. From that point of view, our real number representation is hybrid by combining features of both fixed point and floating point numbers.

From the compiler's perspective, the exponent can be considered to be public whereas the mantissa can be regarded as private. Yet, as the compiler certainly does not know the secret number x, it is impossible for the compiler to determine the exact exponent e that guarantees the above normalization for m, but only an upper bound.

2.2 Hybrid Plaintext Representation of Reals

We introduce the following parameters for representing real numbers in a fixed-point (integer) representation:

-   -   p_(lsb) denotes the bit position of the least-significant bit;     -   (p_(msb)−1) denotes the bit position of the most-significant         bit;     -   ρ=p_(msb)−p_(lsb) denotes the plaintext numerical window, i.e.         the fixed-point precision.         The parameters p_(msb) and p_(lsb) can be determined by the         compiler based on statistical analysis of data expected to be         operated upon. In practice, the limiting factor is the size of         the numerical window ρ (that is, the number of bits of the         mantissa m; equivalently, the difference between the exponent         bound kept by the compiler and the number of binary digits in         the fractional part to be kept). The smaller the ρ is, the more         efficient the arithmetic is on the backend. Thus, the static         analysis needs to ensure the following two conditions:     -   The statically determined bound is sufficient to avoid         overflows.     -   The bound is as precise as possible to avoid loss in precision         (given the limitation on φ.

Definition 1 (integer representation of real numbers). Given parameters p_(msb) and p_(lsb), the class of plaintext values represented using these parameters is denoted by

_(p) _(msb) _(,p) _(lsb) and is defined to be:

_(p) _(msb) _(,p) _(lsb) ={xϵ2^(p) ^(lsb) ·

,|x|<2^(p) ^(msb) }⊂

For example, x=1 will have p_(msb)=1, x=3 has p_(msb)=2. Note that the class

_(Pmsb,Plsb) represents all real (in this case, rational) numbers strictly between 2^(Pmsb) and 2^(Pmsb) with step 2^(Pmsb). Note that p_(lsb) is often negative (when we want to compute exact integral parts and a few bits of precision from the fractional parts), but in general, this need not be the case. Negative p_(lsb), means that we are considering bits for the fractional part. The ρ=p_(msb)−p_(lsb) essentially tells us how many bits we need to represent the number. The more negative p_(lsb), the higher precision you have on the float and the more bits you need to represent it.

Example 1. For p_(msb)=40 and P_(lsb)=−10, we have p=40−(−10)=50. In this case, the least significant bit would be in position −10 and the most significant bit would be in position 39, with the least significant non-fractional bit in position 0.

Example 2. For p_(lsb)=−2 and p_(msb)=5, the number x=11.5=½+1+2+8 is represented as binary as 1011.1₍₂₎ and in

_(5,−2) as 01011.10₍₂₎. In this case, two fractional bits would occupy the bit positions −2 and −1, while the non-fractional bits would occupy positions 0 through 4.

Notice that a given real number can belong to many different plaintext classes (i.e., 11.5 in the above example belongs to

_(5,−2), but it also belongs to

_(5,−10) as well as

_(10,−2)).

FIG. 2 illustrates the relationship between the bits p_(msb) and p_(lsb) in a fixed point representation and the associated bits that would be affected in underflow and overflow conditions.

Plaintext overflow. The set

_(p) _(msb) _(,p) _(lsb) is neither a group nor a ring; in particular, it is not stable under the real arithmetic operations such as addition, subtraction, multiplication, etc. For example, the number 3 belongs to

_(2,0), but 3+3, −3−3 and 3×3 all exceed the bound 2^(p) ^(msb) . More generally, we call plaintext overflow any case where the result of an expression exceeds the 2^(p) ^(msb) of the output plaintext set.

To avoid the risk of plaintext overflow, we ensure p_(msb) is at least log₂(x). But the parameters p_(msb) and p_(lsb) of a variable have to be specified at compile time (before knowing the actual value of the value x), so to mitigate the risk, we need to set p_(msb) to be an upper bound for all possible values. This ensures that no overflow occurs when assigning the actual value to the variable. This also means that the actual (or floating-point) precision is always smaller than the fixed-point precision p_(msb)−p_(lsb)

Plaintext underflow. If the fixed exponent is chosen to be too large, it is possible to completely lose the plaintext information. For example, if x=1×10⁻³ and y=6×10⁻⁶, xy=6×10⁻⁶ then for the floating point representation one decimal digit is enough to represent the mantissa of the product and the computed exponent is ┌log₂(x)┐=−18.

On the other hand, in the fixed-point world, if the plaintext parameters of the inputs have been set to (p_(msb), p_(lsb))=(0, 14) which corresponds to 4 decimal digits of precision, a common mistake would be to assume that the product p_(msb) is the sum of the two inputs p_(msb), and here, expect a result of the same 14 bits of fixed-point precision, so with parameters (p_(msb), p_(lsb))=(0,−14): in this case, the result is computed as: 0.0010×0.0060=0.0000 which completely loses the result. Such cases are called plaintext underflow, and although we effectively have 14 bits of fixed point precision in this example, the computed result is completely wrong from a floating point perspective.

2.3 ModReal—Modular Representation of Real Numbers

The ModReal representation refers to a modular integer representation real arithmetic, which can be based on 64-bit or 128-bit integers, for example. This representation can use the fixed point unit of a computer processor with a fixed-point representation of real numbers, having a fixed number of binary digits after the decimal point.

To achieve security in multi-party computations, plaintext values of a certain size are secret shared to share values that typically belong to a class of values with larger parameters. In addition, secret shares are masked by values from the larger class. These larger secret shares classes are parametrized by two integers M_(msb) and p_(lsb). We voluntarily use the same symbol p_(lsb), because in all cases, it matches the plaintext least significant position; however, the parameter M_(msb) used for secret shared data will typically be larger than the p_(msb) used for the corresponding plaintext.

-   -   p_(lsb) denotes the bit position of the least-significant bit of         the masks/shares;     -   (M_(msb)−1) denotes the bit position of the most significant bit         of the masks/shares.

Definition 2 (modular representation of real numbers). Given parameters M_(msb) and p_(lsb), the class used for modular representation of secret shares of real numbers is defined as the finite abelian group

_(M) _(msb) _(,p) _(lsb) =2^(p) ^(lsb)

/2^(M) ^(msb)

Note that

_(M) _(msb) _(,p) _(lsb) is isomorphic (as an abelian group) to (

/2^(M) ^(msb) ^(−p) ^(lsb)

,+) and has a natural

-module structure that we will use.

The important property of the class

_(M) _(msb) _(,p) _(lsb) (unlike the set of all real numbers

) that will ultimately allow us to achieve information-theoretic security properties of the MPC computations is that it admits a uniform distribution.

Example. For p_(lsb)=−2 and p_(msb)=6, the number x=11.5=12+1+2+8 is represented as binary as 1011.1 and in

_(6,−2) as 001011.10. The opposite number x′=−11.5=52.5=1/2+4+16+32 mod 64 is represented as binary as 110100.1 and in

_(6,−2) as 110100.10. Note that the bits of the integer parts of x and x′ are opposite. The first bit gives the sign of the number: if the first bit is 0 then the number is positive, else it is negative.

2.4 ModReal Mathematical Lifts

Before we define the notion of secret shares, we present several natural lifts of the torus

/2^(M)

(for a positive integer M) to

(the real numbers) that will be used throughout. Here, a lift means a section of the natural surjection

/2^(M)

. We define four mathematical lifts that go from

_(M) _(msb) _(,p) _(lsb) to

that are parametrized by an integer 2^(M) as follows:

-   -   centermod₂ _(M) (x) is defined as the unique real number

$\overset{˜}{x} \in \left\lbrack {{- \frac{2^{M}}{2}},\frac{2^{M}}{2}} \right)$ such that {tilde over (x)}−xϵ2^(M)

-   -   posmod₂ _(M) (x) is defined as the unique real {tilde over         (x)}ϵ[0,2^(M)) such that {tilde over (x)}−xϵ2^(M)     -   quartermod₂ _(M) (x) is defined as the unique real

$\overset{˜}{x} \in \left\lbrack {{- \frac{2^{M}}{4}},\frac{3 \cdot 2^{M}}{4}} \right)$ such that {tilde over (x)}−xϵ2^(M)

-   -   diffmod₂ _(M) (x) is defined as posmod₂ _(M) (x)−centermod₂ _(M)         (x). This difference is either 0 or 2^(M) depending on which         half space x belongs to.

2.5 Modular Representation of Shares

The modular representation can be used advantageously to represent shares of a secret-shared real number.

Definition 3 (modular representation of secret shares). In one embodiment, a number xϵ

_(p) _(msb) _(,p) _(lsb) is secret shared in the class

_(M) _(msb) _(,p) _(lsb) as

x

_(M) _(msb) _(,p) _(lsb) =(x₁, . . . , x_(k))ϵ

_(M) _(msb) _(,p) _(lsb) ^(k) if

$x = {{ce}ntermo{d_{2^{M}{msb}}\left( {\sum\limits_{j = 1}^{k}x_{j}} \right)}}$ The share is correct and unconditionally secure if log₂|x|<M_(msb)−1, which condition is met when M_(msb)≥p_(msb)+1.

Advantages of a modular representation over a non-modular representation of MPC shares can be shown by example.

Example 1. We first consider the case of a non-modular representation of each share using the above non-modular class

_(p) _(msb) _(,p) _(lsb) . The plaintext integer 42 can be secret-shared among three parties as [33,97,−88] in

_(7,0), or as [164301,−806845,642586] in

_(20,0). In both cases, we need all the three shares to recompute the exact plaintext integer. In the first scenario, however, the sum of the first two shares is quite large compared to 2⁷=128, and gives a strong indication that the plaintext integer is positive. The problem is mitigated in the second example, which uses a larger p_(msb) but at the cost of a larger representation.

Example 2: We next consider the same integer 42 as secret-shared among three parties as [33,97,40] in

_(7,0). We need all the three shares to recompute the exact integer plaintext, but this time, since

_(7,0) is a group and has a uniform distribution, the first two shares give no information at all on the plaintext value. The security of such shares, for a coalition of k−1 parties out of k is information theoretic.

3 Casting Operations

In order to support basic arithmetic operations such as addition and multiplication on secret shared real numbers represented in modular integer form, we need to first ensure that the two operands can be cast in compatible classes (plaintext and secret shares classes). It is thus important to enable casting operations to efficiently transform a representation with respect to a given set of parameters to a representation with respect to another set of parameters. In this section, we explain how to transform a set of modular shares from a given class

_(M) _(msb) _(,p) _(lsb) into another set of modular shares from another class

_(M′) _(msb) _(,p′) _(lsb) with different parameters M′_(msb), p′_(lsb). The casting operations may or may not require communication depending on whether we decrease or increase the parameters p_(lsb) and M_(msb).

FIG. 3 illustrates four casting operations for casting representations between classes depending on whether we increase or decrease either of the parameters p_(lsb) and M_(msb). These four casting operations include Extend, Round, Project and Lift (with Lift being distinct from the four natural lifts referenced above).

FIG. 4 illustrates an example application of each of the four casting operations on an example input value. In the illustrated example, modular shares for the plaintext value x=1011.1₍₂₎ are secret shared among two parties with modular shares x₁=001000.10 and x₂=000011.00 in

_(6,−2). The example shows how the share x₁ is cast to another modular number with a different parameter p_(lsb) or M_(msb). For simplicity, the operations are presented on scalars, but more generally, all these operations are to be performed independently on each coefficient of any vector/matrix/tensor.

Extend (p′_(lsb)<p_(lsb)): The Extend casting operation adds additional least significant bits to each input share and sets the new least significant bits to 0 in the new representation to fill in the new bits in the representation. The Extend operation does not require communication between the parties.

Round (p′_(lsb)>p_(lsb)): The Round casting operation deletes least significant bits from each input share. The Round casting operation can be implemented either with or without communication between the parties holding the shares. In the case that the Round casting operation is implemented without communication, each party rounds to remove the least significant bits locally from their share. This implementation does not guarantee that the p′_(lsb) least significant bits of the plaintext are correct due to carry-related errors. The Round casting operation can, however, be implemented with communication between the parties to ensure that secret shares add up to a plaintext value whose p′_(lsb) are correct. Such an implementation of the Round casting operation that preserves precision, called ShareRefresh, is presented below, but it is more expensive in terms of run-time, memory and communication.

Project (M′_(msb)<M_(msb)): The Project casting operation, which also does not require communication between the parties, transforms shares according to the following natural surjective homomorphism:

/2^(M) ^(msb) ^(−p) ^(lsb)

/2 ^(M′) ^(msb) ^(−p) ^(lsb)

Lift (M′_(msb)>M_(msb)): The Lift casting operation requires communication between the parties as well as offline and online phases. An implementation of the Lift casting operation that computes the results correctly 100% of the time is presented below. This implementation improves on the prior work where the operations are probabilistic and have a non-zero probability of failure.

Below, we explain an implementation of the Lift casting operation with its online and offline phases in accordance with one embodiment. We do this in a slightly more general way by not necessarily assuming that p′_(lsb)=p_(lsb). This has the practical advantage that one can often merge the cast operations Lift and ShareRefresh into a single operation that requires communication instead of two separate ones.

3.1 Implementation of the Lift Casting Operation on Secret Shares in Integer Modular Representation

In this section we explain how to transform or cast a set of shares from a first modular class

_(M) _(msb) _(,p) _(lsb) into another set of shares of a second modular class

_(M′) _(msb) _(,p′) _(lsb) , where the M′_(msb) of the second class is greater than the M_(msb) of the first class, and where the p′_(lsb) of the second class can be less than, equal to or greater than the p_(lsb) of the first class. We will refer to this particular cast operation on secret shares in integer modular representation as Lift (capitalized to distinguish from more general natural lifts described above). In one embodiment, the Lift operation is executed in part offline (without communication between the parties) and in part online (with communication between the parties) in a system for multi-party computation including a trusted dealer.

In accordance with one embodiment, the Lift operation operates on a secret shared MPC container (recall, as introduced in the Background section above), which is masked-and-revealed as follows:

-   -   secret shares         x         _(M) _(msb) _(,p) _(lsb) of a plaintext xϵ         _(p) _(msb) _(,p) _(lsb) with p_(msb)≤M_(msb)−2     -   mask shares         λ         _(M) _(msb) _(,p) _(lsb) whose sum λ is uniformly random in         _(M) _(msb) _(,p) _(lsb) and unknown by the parties.     -   the masked value a=x+λϵ         _(M) _(msb) _(,p) _(lsb) , revealed and known by all parties.

The goal of the Lift operation is to compute secret shares

z

_(M′) _(msb) _(,p′) _(lsb) of the same plaintext x, where M′_(msb) is larger than M_(msb).

Definition 4.

Let λϵ

_(M) _(msb) _(,p) _(lsb) and N:=2^(M) ^(msb) .

We partition the range

$I = \left\lbrack {{- \frac{N}{4}},\frac{3N}{4}} \right)$ ⊂

as the disjoint union I₀

I₁ where

$I_{0}:={{\left\lbrack {{- \frac{N}{4}},\ \frac{N}{4}} \right)\mspace{14mu}{and}\mspace{14mu} I_{1}}:={\left\lbrack {\frac{N}{4},\frac{3N}{4}} \right).}}$ We define a selection variable or bit as follows

$b_{\lambda} = \left\{ \begin{matrix} 0 & {{{if}\mspace{14mu}{quartermod}_{N}\ (\lambda)} \in \left. I_{0}\Leftrightarrow{{quartermo{d_{N}(\lambda)}} < \frac{N}{4}} \right.} \\ 1 & {{{if}\mspace{14mu}{quartermod}_{N}\ (\lambda)} \in \left. I_{1}\Leftrightarrow{{quartermo{d_{N}(\lambda)}} \geq \frac{N}{4}} \right.} \end{matrix} \right.$ In particular, b_(λ)=0 is equivalent to λϵI₀+2^(M) ^(msb)

, which can be rewritten as λϵ[−2^(M) ^(msb) ⁻², 2^(M) ^(msb) ⁻²). Similarly b_(λ)=1 is equivalent to λϵI₁+2^(M) ^(msb)

, which can be rewritten as λϵ[2^(M) ^(msb) ⁻², 3×2^(M) ^(msb) ⁻²).

The cast operation leverages these two possibilities, which can be encoded into the bit b_(λ), for quartermod_(N)(λ): λϵI₀ or λϵI₁. Letting a=x+λϵ2^(p) ^(lsb)

/2^(M) ^(msb)

, one can consider the two mathematical lifts (both in

) ã ₀=centermod_(N)(a) and ã ₁ =pos mod_(N)(a). We can require that the secret shared value x be within the range xϵ[−N/4, N/4), and with this condition being met, we observe the following equality:

${{{centermod}_{N}(x)} + {{quartermod}_{N}(\lambda)}} = \left\{ \begin{matrix} {{\overset{\sim}{a}}_{0} = {{centermod}_{N}(a)}} & {{{if}\mspace{14mu} b_{\lambda}} = 0} \\ {{\overset{\sim}{a}}_{1} = {{posmod}_{N}(a)}} & {{{if}\mspace{14mu} b_{\lambda}} = 1} \end{matrix} \right.$ or more concisely

${{{centermod}_{N}(x)} + {{quartermod}_{N}(\lambda)}} = \left\{ {\begin{matrix} {\overset{\sim}{a}}_{0} & {{{if}\mspace{14mu} b_{\lambda}} = 0} \\ {\overset{\sim}{a}}_{1} & {{{if}\mspace{14mu} b_{\lambda}} = 1} \end{matrix}.} \right.$ One can logically rewrite this equation as centermod_(N)(x)+quartermod_(N)(λ)=ã ₀ +b _(λ)(ã ₁ −ã ₀)ϵ

  (1) in order to effectively select between the values ã₀ and ã₁ depending on the value of b_(λ).

To obtain shares modulo 2^(M′) ^(msb) for x (the unmasking of x into the second class), one can project the above equality to the torus

/2^(M′) ^(msb)

the via the natural surjection

/2^(M′) ^(msb)

. Since the trusted dealer can precompute and secret share the image v of quartermod_(N)(λ) (in

_(M′) _(msb) _(,p′) _(lsb) =2^(p′) ^(lsb)

/2^(M′) ^(msb)

), the parties can recover

x

_(M′) _(msb) _(p′) _(lsb) out of knowledge of ã ₀ +b _(λ)(ã ₁ −ã ₀)mod 2^(M′) ^(msb) in the online phase in conjunction with v based on the above equation (1).

This can be done more particularly as follows. Let a_(j)=ã_(j) mod 2^(M′) ^(msb) for jϵ{0, 1}. The parties can determine (a₁−a₀) based on the revealed masked value a. The trusted dealer precomputes b_(λ) and secret shares it as

b_(λ)

amongst the parties. Although the secret sharing of b_(λ) can be done in

_(M′) _(msb) _(,p) _(lsb) , we note that all but the top M′_(msb)−M_(msb) bits of the binary representation of (a₁−a₀) will always be zero. It thus suffices for the trusted dealer to secret share the bit b_(λ) using the smaller modular class

_(M′) _(msb) _(−M) _(msb) _(,0) in order for the parties to perform multiplications on the shares of

b_(λ)

and (a₁−a₀).

To summarize, the trusted dealer needs to:

1. Generate a random mask λϵ2^(p) ^(lsb)

/2^(M) ^(msb)

2. Compute the selection bit b_(λ) and secret share it in

_(M′) _(msb) _(−M) _(msb) _(,0)

3. Compute a particular lift υ of that λ to 2^(p′) ^(lsb)

/2^(M′) ^(msb)

and secret share it in

_(M′) _(msb) _(,p′) _(lsb) . More precisely, υ:=roundTo(quartermod₂ m _(msb)(λ),2^(p′) ^(lsb) )mod 2^(M′) ^(msb) where the function roundTo(z,

) takes a real number z and an integer

and rounds z to the nearest integer multiple of

. υ can then be secret shared as

υ

in

_(M′) _(msb) _(,p′) _(lsb) .

In the online phase of the computation, the parties use the lifts a₀ and a₁ to 2^(p′) ^(lsb) /2^(M′) ^(msb)

and only extract the top M′_(msb)−M_(msb) bits for the oblivious selection in the computation of the above centermod_(N)(x)+quartermod_(N)(λ).

3.1.1 Pseudocode Implementation of the Lift Operation

FIG. 5 illustrates a pseudocode implementation of an offline phase of the Lift operation in accordance with one embodiment. FIG. 6 illustrates a pseudocode implementation of an online phase of the Lift operation in accordance with this embodiment.

In addition to the roundTo function described above, the Lift operation as illustrated in FIGS. 5 and 6 leverages the secretShares function, which takes as inputs a value and a specification of a class, and outputs a plurality of secrets shares summing to the input value in the representation of the supplied specification of the class.

With respect to the online phase of the operation illustrated in FIG. 6, we define the operation

(for xϵ2^(p′) ^(lsb)

/2^(M′) ^(msb)

and yϵ

/2^(M′) ^(msb) ^(−M) ^(msb)

) as

-   -   x         y:=msb_(M) _(msb) _(−M) _(msb) (x)·y extended with         M_(msb)−p′_(lst) zeroes at the end. In this definition, the         function msb_(N)(x) outputs the N most significant bits of x.

3.2 the ShareRefresh Operation

Definition 5. Let (M_(msb),p_(lsb)) and (M′_(msb),p′_(lsb)) be two pairs of parameters such that M′_(msb)≤M_(msb). The map projectAndRound:

_(M) _(msb) _(,p) _(lsb) →

_(M′) _(msb) _(,p′) _(lsb) is defined as follows: for zϵ

_(params), let z₀ be any of its representatives in

and set projectAndRound_(M′) _(msb) _(,p′) _(lsb) (z):=

|z ₀ −q|(mod 2^(M′) ^(msb) ) One can observe that this can be rewritten as: projectAndRound_(M′) _(msb) _(,p′) _(lsb) (z):=2^(p′) ^(lsb) └z ₀2^(−p′) ^(lsb) ┐(mod 2^(M′) ^(msb) )

Notation note: the notation └x┐ is used herein to denote rounding of the number x to the nearest integer.

Proposition 1. The Definition 5 is well-defined, i.e. it does not depend on the choice of the representative z₀.

Proof. Let zϵM_(params) and let z₁, z₂ be two representatives of z in

. By definition, there exists ωϵ

such that z₁−z₂=2^(M) ^(msb) ω. Since p′_(lsb)≤M′_(msb)≤M_(msb), we have 2^(M) ^(lsb) ^(−p′) ^(lsb) ωϵ

. In particular, └z₁2^(−p′) ^(lsb) ┐=└z₂2^(−p′) ^(lsb) ┐+2^(M) ^(msb) ^(−p′) ^(lsb) ω. Since M′_(msb)≤M_(msb), we get 2^(p′) ^(lsb) └z₁2^(−p′) ^(lsb) ┐≡2^(p′) ^(lsb) └z₂2^(−p′) ^(lsb) ┐(mod 2^(M′) ^(msb) ).

From this point on, we assume that params and params' satisfy the assumptions of Proposition 1.

In one embodiment, a Share Refresh operation is executed in part offline (without communication between the parties) and in part online (with communication between the parties). FIG. 7 illustrates a pseudocode implementation of an offline phase of the Share Refresh operation in accordance with one embodiment. FIG. 8 illustrates a pseudocode implementation of an online phase of the Share Refresh operation in accordance with this embodiment.

4 Beaver Multiplication

4.1 Multiplication on ModReal Backend

The multiplication between two secret shares

x

_(M) _(msb) _(x) _(,p) _(lsb) _(x) and

y

_(M) _(msb) _(y) _(,p) _(lsb) _(y) is defined in:

_(M) _(msb) _(x) _(,p) _(lsb) _(x) ×

_(M) _(msb) _(y) _(,p) _(lsb) _(y) →

_(M) _(msb) _(z) _(,p) _(lsb) _(z) where M_(msb) ^(z) and P_(lsb) ^(z) are referred to as the output parameters. These parameters are typically determined by the compiler during a static analysis.

4.2 Parameter Computation Expressions

The following expressions show the computation of various parameters that are used in conjunction with the figures and descriptions of the beaver multiplication operations that follow: p _(lsb) ^(Aw)=max(p _(lsb) ^(A) ,p _(lsb) ^(z) −p _(msb) ^(B)) p _(lsb) ^(Bw)=max(p _(lsb) ^(B) ,p _(lsb) ^(z) −p _(msb) ^(A)) p _(lsb) ^(W) =p _(lsb) ^(Aw) +p _(lsb) ^(Bw) p _(lsb) ^(W)=min(p _(msb) ^(A) +p _(msb) ^(B) ,p _(msb) ^(z)) M _(msb) ^(W) =p _(msb) ^(W)+2 η=M _(msb) ^(W) −p _(lsb) ^(W) M _(msb) ^(Aw) =p _(lsb) ^(Aw)+η M _(msb) ^(Bw) =p _(lsb) ^(Bw)+η

4.3 Beaver Multiplication on Modular Backend (Secret-Secret)

FIG. 9 illustrates a pseudocode implementation of a Beaver multiplication operation on two secret shared values in modular representation in accordance with one embodiment. FIG. 10 illustrates a schematic of the Beaver multiplication operation.

4.4 Beaver Multiplication on Modular Backend (Secret-Public)

FIG. 11 illustrates a pseudocode implementation of a Beaver multiplication operation on one secret shared value in modular representation and one public value in accordance with one embodiment. FIG. 12 illustrates a schematic of the Beaver multiplication operation.

5 Linear Combination

Let c⁽¹⁾, . . . , c^((n)) be public real numbers given as double-precision floating point numbers, and let

x⁽¹⁾

, . . . ,

x^((n))

_(*) be secret shares with corresponding parameters M_(msb) ^((i)), p_(msb) ^((i)), p_(lsb) ^((i)). Let β^((i)):=└2 ²⁴·c^((i))┐, α^((i)):=2^(−v) ² ^((β) ^((i)) ⁾β^((i)), and k^((i)):=24−v₂(β^((i))), where for a prime p, v_(p)(m) denotes p-adic valuation of an integer mϵ

. In practice, these integers can be represented as 64-bit signed integers. The public vector

$\left( {\frac{\alpha^{(1)}}{2^{k^{(1)}}},\ldots\mspace{14mu},\frac{\alpha^{(n)}}{2^{k^{(n)}}}} \right) \neq 0$ will be our approximation of the coefficients. The choice of 24 above is in order to resemble the plaintext of type float32, whereby the mantissa is 24 bits.

The goal is then to compute a secret share of

$z = {\sum\limits_{i = 1}^{n}{\frac{\alpha^{(i)}}{2^{k^{(1)}}} \cdot x^{(i)}}}$ with corresponding parameters M_(msb) ^(z) and p_(lsb) ^(z). We assume that the input shares are either simultaneously in floating point representation or in modular representation. In one embodiment, mixed inputs are not supported and require an explicit cast. The output backend, however, can be different from the input backend (e.g., having inputs in floating point representations and output in modular representation is fine).

5.1 Default Output Parameters

When no plaintext parameters are available for the output, the statistical analyzer of the compiler may use the following propagation formula to estimate the stats of the result: if all plaintexts are independent variables of mean and variance

(x^((i))), Var(x^((i))), then the mean and variance of the output

$z = {\sum\limits_{i = 1}^{n}{c^{(i)}x^{(i)}\mspace{14mu}{are}\text{:}}}$ ${{\mathbb{E}}(z)} = {\sum\limits_{i = 1}^{n}{c^{(i)}{{\mathbb{E}}\left( x^{(i)} \right)}}}$ ${{Var}(z)} = {\sum\limits_{i = 1}^{n}{\left( c^{(i)} \right)^{2}{{Var}\left( x^{(i)} \right)}}}$ Note that the last formula is only true for independent variables. In one embodiment, we use the following estimate for the variance of a sum: Var(X+Y)=Var(X)+Var(Y)+2 Cov(X,Y)≤≤Var(X)+Var(Y)+2√{square root over (Var(X)·Var(Y))}=(σ_(X)+σ_(Y))².

Based on this propagation formula, the compiler can already infer a reasonable p_(msb), p_(lsb) for the output container, and then assign a M_(msb)>p_(msb) to ensure the correctness and security of the computation. If the compiler cannot make the independence assumption, other techniques should be used to estimate the stats of the result, like simulation on fake values for instance.

5.2 Cleaning Step

In one embodiment, before running a linear combination, the compiler preprocesses the linear combination input as follows: for all 1≤i≤n,

-   -   Remove all indices i for which α^((i))=0.     -   Remove all indices i for which:

${{\log_{2}{\alpha^{(i)}}} - k^{(i)} + p_{msb}^{(i)}} \leq {\max\limits_{j}{\left( {{\log_{2}{\alpha^{(j)}}} - k^{(j)} + p_{lsb}^{(j)}} \right).}}$ This means that the term is negligible and can be discarded. Note that if we are dynamically removing terms one-by-one, the right-hand side of the above inequality will not change (a term that is removed cannot have a p_(lsb) that equals the maximum).

FIG. 13 illustrates an example input upon which the cleaning step can be performed. In the example, the interval with label 1 should be discarded as negligible since the p_(msb) position is left of the maximal p_(lsb) position of the remaining intervals.

Furthermore, letting

be the remaining index set, we can test according to the following criteria (the output parameters should intersect the input parameters windows):

-   -   Ensure the inequality

$p_{lsb}^{(z)} \leq {\max\limits_{i \in \mathcal{J}}\left( {{\log_{2}{\alpha^{(i)}}} - k^{(i)} + p_{msb}^{(i)}} \right)}$

Otherwise, declare the result negligible or zero.

-   -   Ensure the following inequality

$p_{msb}^{(z)} \geq {\max\limits_{i \in \mathcal{J}}\left( {{\log_{2}{\alpha^{(i)}}} - k^{(i)} + p_{lsb}^{(i)}} \right)}$

Otherwise, one gets undefined behavior.

5.3 Linear Combination Builtin: ModReal Case

In one embodiment, the compiler provides two working parameters for the linear combination: M_(msb) ^(w) and p_(lsb) ^(w). These are selected in such a way that they satisfy the following properties:

-   -   The lift to the ModReal shares class         _(M) _(msb) _(w) _(,p) _(lsb) _(w) of the inputs ensures that         the individual scalar products

$\frac{\alpha^{(i)}}{2^{k^{(i)}}} \cdot x^{i}$ can be computed without overflow and keeping sufficient precision (the latter to be defined precisely).

-   -   The sum of ALL secret shares (there are k of them) of ALL         individual terms (scalar products; there are n of them) can be         computed in this class without an overflow (the latter to be         defined precisely).         This makes the following default choice of parameters         reasonable:

${{p_{lsb}^{w}(1)} = {p_{lsb}^{z} - {{\log_{2}\left( {nk} \right)}/2}}},{{p_{lsb}^{w}(2)} = {\min\limits_{1 \leq i \leq k}\left( {p_{lsb}^{(i)} - k^{(i)}} \right)}},$ M _(msb) ^(w) =M _(msb) ^(z), p _(lsb) ^(w)=max(p _(lsb) ^(w)(1),p _(lsb) ^(w)  (2))

For each 1≤i≤n, the ith input container is first casted to a ModReal number with parameters M_(msb) ^(w)+k^((i)) and Mp_(lsb) ^(w)+k^((i)). When M_(msb) ^(w)+k^((i))>M_(msb) ^((i)), this requires a lift triplet (involving the container's mask X, and two ephemeral precomputed data b, v. Then, the multiplication by α^((i))/2^(k) ^((i)) yields a serializable value of parameters M_(msb) ^(w) and p_(lsb) ^(w), which gets accumulated with the other values. Finally, the sum is cast to the output parameters.

FIG. 14 illustrates a pseudocode implementation of a Linear combination operation with ModReal representation in accordance with one embodiment. FIG. 15 illustrates a schematic of the Linear combination operation.

6 Fourier Approximation of Real-Valued Functions

Normally, a Fourier approximation of a complex-valued function ƒ(x) will be given in the form

${f(x)} \sim {\sum\limits_{n = {- N}}^{N}{a_{n}e^{2\pi in{x/T}}}}$ where T is the period and a_(n) ϵ

. The coefficients a_(n) are in general complex numbers, but if ƒ(x) is a real-valued function then a_(−n)=a_(n) , for n>0 and a₀ϵ

. We then have

${f(x)} \sim {{{Re}\left( {\sum\limits_{n = 0}^{N}{c_{n}e^{{2\pi in{x/T}} - {i\;\varphi_{n}}}}} \right)}.}$ This yields the transform

$\begin{matrix} {{f(x)} \sim {\sum\limits_{n = 0}^{N}{c_{n}{\cos\left( {\frac{2\pi nx}{T} - \varphi_{n}} \right)}}}} & (2) \end{matrix}$ A Fourier term will be a triple (c_(n), n, φ_(n)) for n=0, 1, . . . , N where c_(n)ϵ

is the real coefficient and φ_(n) is the phase.

As an example, consider the sigmoid function

${\sigma(x)} = {\frac{1}{1 + e^{- x}}.}$ The real-valued function ƒ(x)=σ(x)=½ is then odd, which implies that the phases φ_(n) are all equal to π/2.

6.1 Fourier Series Evaluation: ModReal Case

We now explain how to evaluate the expression (2) for xϵ

_(p) _(msb) _(,p) _(lsb) and secret shares

x

ϵ

_(M) _(msb) _(,p) _(lsb) .

Recall that the mask λϵ[−¼−2^(M) ^(msb) ,¾·2^(M) ^(msb) ).

The trusted dealer first computes the mask λ, the corresponding bit b_(λ) and then computes and secret shares (in the offline phase) the vector C_(n)e^(−2πnλ/T−iφ) ^(n) for n=0, 1, . . . , N

The online computation is then performed as follows:

1. Compute ā=x+λ as an element of

/2^(M) ^(msb)

.

2. Compute the correct lift a=x+λϵ

by using the secret shares of ā and of b_(λ). This is possible since a=centermod(ā)+2^(M) ^(msb) ·b_(λ)·msb(ā).

3. Compute e^(2πna/T) for n=0, 1, . . . , N (this requires the lift a and not just the original ā).

4. Compute secret shares of c_(n)e^(2πnx/T)=e^(2πna/T)·(c_(n)e^(−2πnλ/T−iφ) ^(n) ). This requires local multiplications in a certain plaintext class to be determined.

To determine the plaintext parameters of the result, we impose the constraint that the entire computation occurs within a maximal numerical window of η bits (e.g., η=64 if we would like to use only 64-bit integers on the backend).

First, p_(msb) ^(z) can be estimated using the trivial bound, namely

$p_{msb}^{z} = {{\log_{2}\left( {\sum\limits_{n = 0}^{N}{c_{n}}} \right)}.}$ To get the optimal p_(lsb) ^(z) let p be the numerical window, that is p=p_(msb) ^(z)−p_(lsb) ^(z). Letting ε=┌log₂ N┐, our constraint is given by the inequality

${{{2p} + ɛ + 2} \leq \eta},{i.e.},{p \leq \frac{\eta - ɛ - 2}{2}}$

That means that we need to determine the maximal numerical window for the output of the computation. To see why this inequality should hold, note that if one requires p bits of precision for each of the multipliers in the products

${{c_{n}e^{2\pi in{x/T}}} = {e^{2\pi in{a/T}} \cdot \left( {c_{n}e^{{- \frac{2\pi in\lambda}{T}} - \varphi_{n}}} \right)}},$ hence, the 2p. We then have to take the sum of ε of these terms and add the two additional bits for the modular shares class. Hence, we can set

$p_{lsb}^{z} = {p_{msb}^{z} - \left\lfloor \frac{\eta - ɛ - 2}{2} \right\rfloor}$ In addition, the compiler needs to provide working parameters for the Fourier series builtin:

-   -   (M_(msb) ^(aw), p_(lsb) ^(aw))—lifting parameters for the masked         value a=x+λ,     -   (M_(msb) ^(lw),p_(lsb) ^(lw))—lifting parameters for the mask λ.

To determine the working parameters, we start by determining the least significant bit positions (we do this in order to guarantee sufficient precision). The following formulas are reasonable: p _(lsb) ^(aw) =−p and M _(msb) ^(aw) =p _(lsb) ^(aw)+η, p _(lsb) ^(lw) =−p _(lsb) ^(z)−ε and M _(msb) ^(lw) =p _(lsb) ^(lw)+η. This choice requires some justification: the parameter p_(lsb) ^(aw)=−p ensures that we have a numerical window of size p in the computation of e^(2πina/T). Indeed, the most significant bit position for that quantity is 0, so we need at least p binary digits in the fractional part. Yet, the computation assumes that both inputs to Beaver require the same numerical window, that is, we have a multiplication that can be viewed as a map

_(M) _(msb) _(aw) _(,p) _(lsb) _(aw) ×

_(M) _(msb) _(lw) _(,p) _(lsb) _(lw) →

_(p) _(lsb) _(lw) _(+p) _(lsb) _(aw) _(+η,p) _(lsb) _(lw) _(,p) _(lsb) _(aw) .

7 Communication Model

FIGS. 16A and 16B illustrate schematics of communication channels between computing systems during an offline phase of a multi-party computation (MPC). FIG. 16A shows the communication channels for a trusted dealer model while FIG. 16B shows the channels for the honest but curious model. In the trusted dealer model, the dealer sends numerical masking data (also referred to as triplets) to each party via a private channel. In the honest but curious model, the parties have access to a private broadcast channel shared between all of them, and each party shares an additional private channel with the dealer. The private channels are denoted with dashed lines. In the trusted dealer model, the dealer generates the masking data and uses private channels to send to each party a respective share of the data (one-way arrows). In the honest but curious model, the parties collaborate for the generation of the numerical masking data, and to do this, they need an additional private broadcast channel between them that is not accessible to the dealer. Although only three parties are shown, the model can be extended to an arbitrary number of parties.

FIG. 17 illustrates a schematic of communication channels between parties during an online phase in accordance with one embodiment. The parties send and receive masked values via a public broadcast channel denoted with solid lines. The online phase is the same in both the trusted dealer and honest but curious models and the dealer is not present.

Although the methods disclosed herein are in some cases described with respect to the trusted dealer model, these methods can also be used with the honest but curious model.

8 Computer Implementation

Components of the embodiments disclosed herein, which may be referred to as methods, processes, applications, programs, modules, engines, functions or the like, can be implemented by configuring one or more computers or computer systems using special purpose software embodied as instructions on a non-transitory computer readable medium. The one or more computers or computer systems can be or include one or more standalone, client and/or server computers, which can be optionally networked through wired and/or wireless networks as a networked computer system.

The special purpose software can include one or more instances thereof, each of which can include, for example, one or more of client software, server software, desktop application software, app software, database software, operating system software, and driver software. Client software be configured to operate a system as a client that sends requests for and receives information from one or more servers and/or databases. Server software can be configured to operate a system as one or more servers that receive requests for and send information to one or more clients. Desktop application software and/or app software can operate a desktop application or app on desktop and/or portable computers. Database software can be configured to operate one or more databases on a system to store data and/or information and respond to requests by client software to retrieve, store, and/or update data. Operating system software and driver software can be configured to provide an operating system as a platform and/or drivers as interfaces to hardware or processes for use by other software of a computer or computer system. By way of example, any data created, used or operated upon by the embodiments disclosed herein can be stored in, accessed from, and/or modified in a database operating on a computer system.

FIG. 18 illustrates a general computer architecture 1800 that can be appropriately configured to implement components disclosed in accordance with various embodiments. The computing architecture 1800 can include various common computing elements, such as a computer 1801, a network 1818, and one or more remote computers 1830. The embodiments disclosed herein, however, are not limited to implementation by the general computing architecture 1800.

Referring to FIG. 18, the computer 1801 can be any of a variety of general purpose computers such as, for example, a server, a desktop computer, a laptop computer, a tablet computer or a mobile computing device. The computer 1801 can include a processing unit 1802, a system memory 1804 and a system bus 1806.

The processing unit 1802 can be or include one or more of any of various commercially available computer processors, which can each include one or more processing cores that can operate independently of each other. Additional co-processing units, such as a graphics processing unit 1803, also can be present in the computer.

The system memory 1804 can include volatile devices, such as dynamic random access memory (DRAM) or other random access memory devices. The system memory 1804 can also or alternatively include non-volatile devices, such as a read-only memory or flash memory.

The computer 1801 can include local non-volatile secondary storage 1808 such as a disk drive, solid state disk, or removable memory card. The local storage 1808 can include one or more removable and/or non-removable storage units. The local storage 1808 can be used to store an operating system that initiates and manages various applications that execute on the computer. The local storage 1808 can also be used to store special purpose software configured to implement the components of the embodiments disclosed herein and that can be executed as one or more applications under the operating system.

The computer 1801 can also include communication device(s) 1812 through which the computer communicates with other devices, such as one or more remote computers 1830, over wired and/or wireless computer networks 1818. Communications device(s) 1812 can include, for example, a network interface for communicating data over a wired computer network. The communication device(s) 1812 can include, for example, one or more radio transmitters for communications over Wi-Fi, Bluetooth, and/or mobile telephone networks.

The computer 1801 can also access network storage 1820 through the computer network 1818. The network storage can include, for example, a network attached storage device located on a local network, or cloud-based storage hosted at one or more remote data centers. The operating system and/or special purpose software can alternatively be stored in the network storage 1820.

The computer 1801 can have various input device(s) 1814 such as a keyboard, mouse, touchscreen, camera, microphone, accelerometer, thermometer, magnetometer, or any other sensor. Output device(s) 1816 such as a display, speakers, printer, or eccentric rotating mass vibration motor can also be included.

The various storage 1808, communication device(s) 1812, output devices 1816 and input devices 1814 can be integrated within a housing of the computer, or can be connected through various input/output interface devices on the computer, in which case the reference numbers 1808, 1812, 1814 and 1816 can indicate either the interface for connection to a device or the device itself as the case may be.

Any of the foregoing aspects may be embodied in one or more instances as a computer system, as a process performed by such a computer system, as any individual component of such a computer system, or as an article of manufacture including computer storage in which computer program instructions are stored and which, when processed by one or more computers, configure the one or more computers to provide such a computer system or any individual component of such a computer system. A server, computer server, a host or a client device can each be embodied as a computer or a computer system. A computer system may be practiced in distributed computing environments where operations are performed by multiple computers that are linked through a communications network. In a distributed computing environment, computer programs can be located in both local and remote computer storage media.

Each component of a computer system such as described herein, and which operates on one or more computers, can be implemented using the one or more processing units of the computer and one or more computer programs processed by the one or more processing units. A computer program includes computer-executable instructions and/or computer-interpreted instructions, such as program modules, which instructions are processed by one or more processing units in the computer. Generally, such instructions define routines, programs, objects, components, data structures, and so on, that, when processed by a processing unit, instruct the processing unit to perform operations on data or configure the processor or computer to implement various components or data structures.

Components of the embodiments disclosed herein, which may be referred to as modules, engines, processes, functions or the like, can be implemented in hardware, such as by using special purpose hardware logic components, by configuring general purpose computing resources using special purpose software, or by a combination of special purpose hardware and configured general purpose computing resources. Illustrative types of hardware logic components that can be used include, for example, Field-programmable Gate Arrays (FPGAs), Application-specific Integrated Circuits (ASICs), Application-specific Standard Products (ASSPs), System-on-a-chip systems (SOCs), and Complex Programmable Logic Devices (CPLDs).

9 Concluding Comments

Although the subject matter has been described in terms of certain embodiments, other embodiments that may or may not provide various features and aspects set forth herein shall be understood to be contemplated by this disclosure. The specific embodiments described above are disclosed as examples only, and the scope of the patented subject matter is defined by the claims that follow. In the claims, the term “based upon” shall include situations in which a factor is taken into account directly and/or indirectly, and possibly in conjunction with other factors, in producing a result or effect. In the claims, a portion shall include greater than none and up to the whole of a thing; encryption of a thing shall include encryption of a portion of the thing. In method claims, any reference characters are used for convenience of description only, and do not indicate a particular order for performing a method. 

The invention claimed is:
 1. A method for casting a secret shared value from a first modular representation to a second modular representation, the method being performed by a secure multi-party computing system configured for performing multi-party computations on secret shared values, the secure multi-party computing system comprising a trusted dealer computing system and a plurality of party computing systems in secure networked communication, the method comprising: each of the party computing systems storing a respective secret share of the secret shared value in the first modular representation, wherein the first modular representation has a range defined by a most significant bit position and a least significant bit position of the first modular representation; the trusted dealer computing system storing a masking value and communicating to each of the party computing systems a respective secret share of the masking value in the first modular representation, wherein the masking value is secret shared between the party computing systems in the first modular representation; the trusted dealer computing system: determining a subrange in which the masking value resides, wherein the subrange is selected from a plurality of predetermined non-overlapping subranges representing the range of the first modular representation, encoding the determined subrange into a numerical subrange identifier, and communicating to each of the party computing systems a respective secret share of the numerical subrange identifier, wherein the numerical subrange identifier is secret shared between the party computing systems; the trusted dealer computing system transforming the masking value, in a first transformation, into a transformed masking value by at least performing a first mathematical lift on the masking value; the trusted dealer computing system communicating to each of the party computing systems a respective secret share of the transformed masking value in the second modular representation, wherein the transformed masking value is secret shared between the party computing systems in the second modular representation, wherein the second modular representation has a range defined by a most significant bit position and a least significant bit position of the second modular representation, and wherein the most significant bit position of the second modular representation is greater than the most significant bit position of the first modular representation; the party computing systems masking and revealing the secret shared value as a masked value representing a sum of the secret shared value and the masking value without revealing the secret shares of the secret shared value or the secret shares of the masking value; transforming the masked value, in a second transformation, into a first transformed masked value by at least performing a second mathematical lift on the masked value; transforming the masked value, in a third transformation, into a second transformed masked value by at least performing a third mathematical lift on the masked value, wherein the first mathematical lift, the second mathematical lift and the third mathematical lift are each different from one another; and the party computing systems collaboratively computing the secret shared value in the second modular representation, wherein each of the party computing systems computes a respective secret share of the secret shared value in the second modular representation based on: the first transformed masked value, the second transformed masked value, for each party computing system, the respective secret share of the numerical subrange identifier, and for each party computing system, the respective secret share of the transformed masking value.
 2. The method of claim 1, wherein the first mathematical lift and the second mathematical lift produce values relative to each other that are offset by one quarter of the range of the first modular representation, and wherein the second mathematical lift and the third mathematical lift produce values relative to each other that are offset by one half of the range of the first modular representation.
 3. The method of claim 1, wherein the first mathematical lift, the second mathematical lift, and the third mathematical lift are each selected from a group consisting of: a quartermod lift parameterized by 2^(M) ^(msb) , where (M_(msb)−1) is the most significant bit position of the first modular representation, a centermod lift parameterized by 2^(M) ^(msb) , and a posmod lift parameterized by 2^(M) ^(msb) .
 4. The method of claim 1, wherein the first mathematical lift is a quartermod lift on the masking value parameterized by 2^(M) ^(msb) , wherein the second mathematical lift is a centermod lift on the masked value parameterized by 2^(M) ^(msb) , wherein the third mathematical lift is a posmod lift on the masked value parameterized by 2^(M) ^(msb) , and where (M_(msb)−1) is the most significant bit position of the first modular representation.
 5. The method of claim 4, wherein a quartermod lift on x parameterized by 2^(M) is defined as a unique real $\overset{\sim}{x} \in \left\lbrack {{- \frac{2^{M}}{4}},\frac{3 \cdot 2^{M}}{4}} \right)$ such that {tilde over (x)}−xϵ2^(M)

, wherein a centermod lift on x parameterized by 2^(M) is defined as a unique real $\overset{\sim}{x} \in \left\lbrack {{- \frac{2^{M}}{2}},\frac{2^{M}}{2}} \right)$ such that {tilde over (x)}−xϵ2^(M)

, and wherein a posmod lift on x parameterized by 2^(M) is defined as a unique real {tilde over (x)}ϵ0,2^(M)) such that {tilde over (x)}−xϵ2^(M)

.
 6. The method of claim 5, wherein the first transformation further comprises: rounding a result of the first mathematical lift to a nearest multiple of 2^(p′) ^(lsb) to produce a first rounding, where p′_(lsb) is the least significant bit position of the second modular representation, and taking a modulo 2^(M′) ^(msb) of the first rounding, where (M′_(msb)−1) is the most significant bit position of the second modular representation; wherein the second transformation further comprises: rounding a result of the second mathematical lift to a nearest multiple of 2^(p′) ^(lsb) to produce a second rounding, and taking a modulo 2^(M′) ^(msb) of the second rounding; and wherein the third transformation further comprises: rounding a result of the third mathematical lift to a nearest multiple of 2^(p′) ^(lsb) to produce a third rounding, and taking a modulo 2^(M′) ^(msb) of the third rounding.
 7. The method of claim 1, wherein the first transformation, the second transformation and the third transformation each comprises projecting a result of the first mathematical lift, the second mathematical lift, and the third mathematical lift, respectively, onto

/2^(M′) ^(msb)

, where (M′_(msb)−1) is the most significant bit position of the second modular representation.
 8. The method of claim 1, wherein the plurality of predetermined non-overlapping subranges consists of two equally sized subranges, and wherein the numerical subrange identifier is selected from a group consisting of the numbers 0 and
 1. 9. The method of claim 8, wherein the secret shared numerical subrange identifier is used by the party computing systems collaboratively to select between the first transformed masked value and the second transformed masked value for use in calculating the secret shared value in the second modular representation.
 10. The method of claim 1, wherein the first modular representation and the second modular representation are fixed point integer representations of real numbers.
 11. A system comprising a plurality of computer systems, wherein the plurality of computer systems perform the method of claim
 1. 12. A non-transitory computer-readable medium encoded with computer code that is executed by a plurality of computer systems and causes the plurality of computer systems to perform the method of claim
 1. 13. A method for casting a secret shared value from a first modular representation to a second modular representation, the method being performed by a secure multi-party computing system configured for performing multi-party computations on secret shared values, the secure multi-party computing system comprising a plurality of party computing systems in secure networked communication, the method comprising: each of the party computing systems storing a respective secret share of the secret shared value in the first modular representation, wherein the first modular representation has a range defined by a most significant bit position and a least significant bit position of the first modular representation; communicating to each of the party computing systems a respective secret share of a masking value, wherein the masking value is secret shared between the party computing systems in the first modular representation; communicating to each of the party computing systems a respective secret share of an indication of a subrange in which the masking value resides, wherein the subrange is selected from a plurality of predetermined non-overlapping subranges representing the range of the first modular representation, wherein the subrange indication is secret shared between the party computing systems; transforming the masking value, in a first transformation, into a transformed masking value by at least performing a first mathematical lift on the masking value; communicating to each of the party computing systems a respective secret share of the transformed masking value in the second modular representation, wherein the transformed masking value is secret shared between the party computing systems in the second modular representation, wherein the second modular representation has a range defined by a most significant bit position and a least significant bit position of the second modular representation, and wherein the most significant bit position of the second modular representation is greater than the most significant bit position of the first modular representation; the party computing systems masking and revealing the secret shared value as a masked value representing a sum of the secret shared value and the masking value without revealing the secret shares of the secret shared value or the secret shares of the masking value; transforming the masked value, in a second transformation, into a first transformed masked value by at least performing a second mathematical lift on the masked value; transforming the masked value, in a third transformation, into a second transformed masked value by at least performing a third mathematical lift on the masked value, wherein the first mathematical lift, the second mathematical lift and the third mathematical lift are each different from one another; and the party computing systems collaboratively computing the secret shared value in the second modular representation, wherein each of the party computing systems computes a respective secret share of the secret shared value in the second modular representation based on: the first transformed masked value, the second transformed masked value, for each party computing system, the respective secret share of the subrange indication, and for each party computing system, the respective secret share of the transformed masking value.
 14. The method of claim 13, wherein the first transformation, the second transformation and the third transformation each comprises projecting a result of the associated mathematical lift onto

/2^(M′) ^(msb)

, where (M′_(msb)−1) is the most significant bit position of the second modular representation.
 15. The method of claim 13, wherein the “plurality of predetermined non-overlapping subranges” consists of two equally sized subranges, and wherein the numerical subrange identifier is selected from a group consisting of the numbers 0 and
 1. 16. The method of claim 15, wherein the secret shared numerical subrange identifier is used by the party computing systems collaboratively to select between the first transformed masked value and the second transformed masked value for use in calculating the secret shared value in the second modular representation.
 17. The method of claim 13, wherein the first modular representation and the second modular representation are fixed point integer representations of real numbers.
 18. A method for performing a multiplication of a first secret shared value stored in a respective initial modular representation and a second secret shared value stored in a respective initial modular representation, the method comprising: casting, in accordance with the method of claim 13, at least one of the first secret shared value and the second secret shared value into a common modular representation such that both the first secret shared value and the second secret shared value are stored in the common modular representation; and performing a beaver multiplication on the first secret shared value and the second secret shared value in the common modular representation.
 19. A method for combining a plurality of secret shared values, each being stored in a respective initial modular representation, and a corresponding plurality of static coefficients, the method comprising: casting, in accordance with the method of claim 13, at least one of the plurality of secret shared values into a common modular representation such that all of the plurality of secret shared values are stored in the common modular representation; and performing a linear combination on the plurality of secret shared values stored in the common modular representation and the corresponding plurality of static coefficients.
 20. A method for evaluating a continuous function on a secret shared value, the method comprising: selecting a Fourier series, based on the secret shared value, from a plurality of determined Fourier series, wherein each of the plurality of determined Fourier series is configured to approximate the continuous function on an associated subinterval of a domain of the continuous function; based on the selection, casting, in accordance with the method of claim 13, the secret shared value from the first modular representation to the second modular representation; and approximating a value of the continuous function on the secret shared value in the second modular representation using the selected Fourier series. 